<c:if test="true"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:nxp="http://nuxeo.org/nxweb/pdf"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:fn="http://java.sun.com/jsp/jstl/functions">

<nxu:set var="defaultForComponentId" value="#{widget.id}_input" useAlias="true">
<nxu:set var="forComponentId" value="#{nxu:test(empty forComponentId, defaultForComponentId, forComponentId)}" useAlias="true">

  <c:if test="#{not widgetProperty_hideDeleteButton}">
    <a4j:commandLink immediate="true"
      actionListener="#{editableListBean.performAction}"
      id="#{widget.id}_delete" render="#{widget.id}_panel"
      bypassUpdates="true"
      status="#{widget.id}_status">
      <h:graphicImage value="/icons/delete.png" />
      <f:param name="for" value="#{forComponentId}" />
      <f:param name="index" value="#{model.rowIndex}" />
      <f:param name="type" value="remove" />
    </a4j:commandLink>
  </c:if>

  <c:if test="#{widgetProperty_orderable}">
    <a4j:commandLink immediate="true"
      actionListener="#{editableListBean.performAction}"
      id="#{widget.id}_move_down" render="#{widget.id}_panel"
      bypassUpdates="true" rendered="#{model.rowIndex != model.rowCount - 1}"
      status="#{widget.id}_status">
      <h:graphicImage value="/icons/go_down.png"
        styleClass="moveDownBtn" />
      <f:param name="for" value="#{forComponentId}" />
      <f:param name="index" value="#{model.rowIndex}" />
      <f:param name="type" value="movedown" />
    </a4j:commandLink>
    <h:graphicImage value="/icons/inactive_go_down.png"
      rendered="#{model.rowIndex == model.rowCount - 1}" />

    <a4j:commandLink immediate="true"
      actionListener="#{editableListBean.performAction}"
      id="#{widget.id}_move_up" render="#{widget.id}_panel"
      bypassUpdates="true" rendered="#{model.rowIndex != 0}"
      status="#{widget.id}_status">
      <h:graphicImage value="/icons/go_up.png"
        styleClass="moveUpBtn" />
      <f:param name="for" value="#{forComponentId}" />
      <f:param name="index" value="#{model.rowIndex}" />
      <f:param name="type" value="moveup" />
    </a4j:commandLink>
    <h:graphicImage value="/icons/inactive_go_up.png"
      rendered="#{model.rowIndex == 0}" />
  </c:if>

</nxu:set>
</nxu:set>

</c:if>
